﻿@using System.Collections.Generic;
@using Think.Lenovo.Com.Common;
@using Think.Lenovo.Com.Models;
@using Think.Lenovo.Com.Models.NewsModel;
@using System.Web.Mvc;
@using System.Web.Mvc.Html;
<link href="/Contents/css/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->
</style>
<script type="text/javascript" src="/Scripts/lib/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/Scripts/ViewManageUser.js"></script>
<body>
    <hr />
    <table id="userList" style="table-layout: auto;" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td align="center">
                <font color='green'>Id</font>
            </td>
            <td align="center">
                <font color='green'>新闻标题</font>
            </td>
            <td>
                <font color='green'>分类</font>
            </td>
            <td align="center">
                <font color='green'>作者</font>
            </td>
            <td align="center">
                <font color='green'>发布时间</font>
            </td>
            <td align="center">
                <font color='green'>序号</font>
            </td>
            <td align="center">
                <font color='green'>操作</font>
            </td>
        </tr>
        @{
            foreach (NewsModel u in (LinkedList<NewsModel>)ViewData["listNews"])
            {
            <tr>
                <td align="center">@u.Id
                </td>
                <td align="center">@u.Title
                </td>
                <td align="center">@u.Tree
                </td>
                <td align="center">@u.Author
                </td>
                <td align="center">@u.ReleaseDate
                </td>
                <td align="center">@u.Taxis
                </td>
                <td align="center">
                    <a href="#" onclick="setState(@u.Id,1);">开启</a> | <a href="#" onclick="setState(@u.Id,2);">
                        锁定</a> | <a href="#" onclick="setState(@u.Id,3);">删除</a> | <a href="#" onclick="bindData(@u.Id);">
                            修改</a> |
                </td>
            </tr>
            }
        }
    </table>
    <div id="pager">
        @{
            foreach (PageNumberModel m in (LinkedList<PageNumberModel>)ViewData["pagerNews"])
            {
                if (!m.IsCurrentPage)
                {
                     <a href="@m.PageLink">［@m.PageNum］</a>
                }
                else
                {
                    @m.PageNum
                }
            }
        }
    </div>
</body>
